<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return['set']=$this->plugin_setting('basic');
$keywords=$this->plugin_setting('search');
$return['params']=array('jy'=>1);
if($_RQ['op']=='main'){
	$return=model('jy_weishop/page/goods_index')->getmain($return);
	$sharelink='jy_lianfeeshop/goods.index//fromuser='.$_SESSION['uid'];
	$return['sharedata']['link']=custom_url($sharelink,true);
	$keywords='商品列表,'.$return['setting']['share_keywords']?:$return['sharedata']['desc'];
	$keywords=$pcateinfo['keywords']?:$keywords;
	set_html('title','商品列表');
	set_html('description',$desc);
	set_html('keywords',$keywords);
	exi($return);
}
// js 获取数据
if($_RQ['op']=='getlist'){
	$params=array(
		'uniacid'=>$_SESSION['uniacid'],
		'status'=>1,
		'nochecked'=>0,
		'no_showsys'=>0,
		'type <>'=>4,
		'onepluginname'=>'',
	);
	$list=model('jy_weishop/goods_item')->goodslist($params);
	$payset=uni_setting('pay');
	$credit3_rate=$payset['credit3_rate']?:1;
	foreach($list as &$item){
		$item['credit3']=price($item['price']*$credit3_rate,'int');
	}
	if(empty($list)){
		exi('none');
	}else{
		exi($list);
	}
}	
?>